<%--
  Created by IntelliJ IDEA.
  User: shugen
  Date: 2017/1/16
  Time: 15:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<script type="text/javascript">
    if(${sessionScope.user==null}){
        window.location.href="login.jsp";
    }
</script>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <title>问卷设计</title>
    <base href="<%=basePath%>">
    <link href="less/Black.ico" rel="shortcut icon" />
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="robots" content="noindex,nofollow">
    <script src="js/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="resourse/anserDesign/script/configBase.js"></script>
    <script type="text/javascript" src="resourse/anserDesign/script/exam/exam.js"></script>
    <link href="resourse/plugins/toast/jquery.toast.css" rel="stylesheet">
    <script src="resourse/plugins/toast/jquery.toast.js"></script>
</head>
<body>
<input type="hidden" id="delObj">
<input type="hidden" id="init">
<input type="hidden"   id="basePath" value="<%=basePath%>">
<input type="file" onchange="previewImage(this)"  id="previewImg" name="fileselect[]"  accept="image/gif, image/jpeg,image/png"  >
<!--主体框架开始-->
<div class="pagebox" id="pageContentId">
    <div class="home-desktop" id="desktop_scroll">
        <div style="width:1025px; position: relative;">
            <div class="title">
                <div class="name left">问卷设计 (单选、多选如果 需要对选项进行编号 如：A、B、C、1、2、3  需要自己写)</div>
                <div class="function left" id="ctime" style="color: #0a6aa1;font-size: medium">

                </div>
                <div class="clear"></div>
            </div>
            <div class="create-questions-content">
                <div class="exam-nav">
                    <div class="exam-item">
                        <h4 class="exam-item-title">常用类型<i class="icon-expand"></i></h4>
                        <ul class="exam-nav-list" id="ui_sortable_exam">
                            <li data-uid="1" data-tempId="drag_choice">
                                <a href="javascript:;" data-checkType="1"><i class="icon-singleChoice"></i>单选题</a>
                            </li>
                            <li data-uid="2" data-tempId="drag_choice">
                                <a href="javascript:;" data-checkType="2"><i class="icon-multipleChoice"></i>多选题</a>
                            </li>
                          <%--  <li data-uid="3" data-tempId="drag_choice">
                                <a href="javascript:;" data-checkType="1"><i class="icon-picChoice"></i>图片单选</a>
                            </li>
                            <li data-uid="4" data-tempId="drag_choice">
                                <a href="javascript:;" data-checkType="2"><i class="icon-picsChoice"></i>图片多选</a>
                            </li>--%>
                            <li data-uid="5" data-tempId="drag_completion">
                                <a href="javascript:;" data-checkType="1"><i class="icon-gapFilling"></i>单行填空</a>
                            </li>
                            <li data-uid="6" data-tempId="drag_completion">
                                <a href="javascript:;" data-checkType="2"><i class="icon-multiRow"></i>多行填空</a>
                            </li>
                            <li data-uid="7" data-tempId="drag_describe">
                                <a href="javascript:;"><i class="icon-describe"></i>描述说明</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <!--出题-->
                <div class="create-questions">
                    <div class="questions-head-title">
                        <h4 class="h4-bg T_edit T-center" id="title" data-Tid="10001">问卷标题</h4></div>
                    <table class="questions-items-title">
                        <tbody>
                        <tr>
                            <td class="module-menu">&nbsp;</td>
                            <td>
                                <div id="summary" class="cq-title T_edit" data-Tid="10002">标题概述</div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <ul class="ui-questions-content-list" id="questtions_list"></ul>
                    <ul class="ui-foot-all-list"></ul>
                </div>
            </div>
            <div style="height:40px; margin: 20px 0; text-align: right;">
                <button id="btn_save" type="button" class="cotrlBtn exam-save-btn btnBlue" style="height:40px;width: 140px; font-size:18px;">保存问卷</button>
            </div>
        </div>
    </div>

    <!--选择题-->
    <script type="text/html" id="drag_choice">
        <li class="ui-module items-questions" q-type="{{if type==1}}1{{else if type==2}}2{{/if}}">
            <div class="theme-type">
                <div class="module-menu">
                    <h4></h4>
                    <div class="module-ctrl">
                        <a href="javascript:void(0);" class="ui-up-btn" data-tisp="上移"><i class="icon-up"></i></a>
                        <a href="javascript:void(0);" class="ui-down-btn" data-tisp="下移"><i class="icon-down"></i></a>
                        <a href="javascript:void(0);" class="ui-clone-btn" data-tisp="复制"><i class="icon-clone"></i></a>
                        <a href="javascript:void(0);" class="ui-del-btn" data-tisp="删除"><i class="icon-del"></i></a>
                    </div>
                </div>
                <div class="ui-drag-area">
                    <div class="cq-title T_edit drag_T_edit" data-Tid="{{itmetid}}">{{if type==1}}单选题目标题{{else if type==2}}多选题目标题{{/if}}</div>
                </div>
                <div class="cq-items-content">
                    <ul class="cq-unset-list" data-checkType="{{type}}" data-nameStr="{{name}}">
                        {{each items as itemData i}}
                        <li><label class="input-check"><input type="{{if type==1}}radio{{else if type==2}}checkbox{{/if}}" name="{{name}}" value="{{itemData.value}}" ></label>
                            <div class="cq-answer-content T_edit T_plugins" data-Tid="{{itemData.tid}}" style="font-size:14px;">选项{{i+1}}</div>
                        </li>
                        {{/each}}
                    </ul>
                    <div class="cq-items-ctrl">
                        <a href="javascript:void(0);" class="ui-add-item-btn" data-tisp="添加"><i class="icon-add"></i></a>
                        <a href="javascript:void(0);" class="ui-batch-item-btn" data-tisp="批量添加"><i class="icon-addList"></i></a>
                       <%-- <a href="javascript:void(0);" class="ui-add-answer-btn" data-tisp="添加答案解析"><i class="icon-assignment"></i></a>--%>
                    </div>
                </div>
            </div>
        </li>
    </script>
    <!--填空题-->
    <script type="text/html" id="drag_completion">
        <li class="ui-module items-questions" q-type="{{if type==1}}5{{else if type==2}}6{{/if}}">
            <div class="theme-type">
                <div class="module-menu">
                    <h4></h4>
                    <div class="module-ctrl">
                        <a href="javascript:void(0);" class="ui-up-btn" data-tisp="上移"><i class="icon-up"></i></a>
                        <a href="javascript:void(0);" class="ui-down-btn" data-tisp="下移"><i class="icon-down"></i></a>
                        <a href="javascript:void(0);" class="ui-clone-btn" data-tisp="复制"><i class="icon-clone"></i></a>
                        <a href="javascript:void(0);" class="ui-del-btn" data-tisp="删除"><i class="icon-del"></i></a>
                    </div>
                </div>
                <div class="ui-drag-area">
                    <div class="cq-title "  data-Tid="{{itmetid}}" style="font-size:16px; color: red; cursor: default;">
                        {{if type==1}}填空题--在需要的填空的地方 输入<font color="blue" size="5"  > ( ) </font>{{else if type==2}}完形填空题在需要的地方 输入<font  color="blue" size="5"  >[ ]</font>{{/if}}
                    </div>
                </div>

                <div class="cq-items-content">
                    <div class="describe-edit-content T_edit " data-tid="{{items[0].tid}}" style="font-size:16px;line-height: 1.6;margin: 10px 10px 10px 10px;"></div>
                </div>
            </div>
        </li>
    </script>
    <!--描述题-->
    <script type="text/html" id="drag_describe">
        <li class="ui-module items-questions" q-type="7">
            <div class="theme-type">
                <div class="module-menu">
                    <h4></h4>
                    <div class="module-ctrl">
                        <a href="javascript:void(0);" class="ui-up-btn" data-tisp="上移"><i class="icon-up"></i></a>
                        <a href="javascript:void(0);" class="ui-down-btn" data-tisp="下移"><i class="icon-down"></i></a>
                        <a href="javascript:void(0);" class="ui-clone-btn" data-tisp="复制"><i class="icon-clone"></i></a>
                        <a href="javascript:void(0);" class="ui-del-btn" data-tisp="删除"><i class="icon-del"></i></a>
                    </div>
                </div>
                <div class="ui-drag-area">
                    <div class="cq-title T_edit " data-Tid="{{itmetid}}"><span style="font-size:16px;">描述题目标题</span></div>
                </div>
                <div class="cq-items-content">
                    <div class="describe-edit-content T_edit " data-tid="{{items[0].tid}}" ></div>
                </div>
            </div>
        </li>
    </script>


    <script type="text/html" id="drag_T_edit">
        <div class="cq-into-edit">
            <div class="add-edit cq-edit-title" contenteditable="true">{{title}}</div>
        </div>
    </script>
    <script type="text/html" id="T_edit_plugins">
        <div class="edit-plug-box">
            <a href="javascript:void(0);"><i class="icon-picChoice"></i></a>
            <a href="javascript:void(0);" ><i class="icon-wrong"></i></a>
        </div>
    </script>
    <script type="text/html" id="T_edit_plugins2">
        <div class="edit-plug-box">
            <a href="javascript:void(0);"><i class="icon-k"><font color="blue" size="5"  > ( ) </font></i></a>
            <a href="javascript:void(0);"><i class="icon-h"><font  color="blue" size="5"  > [ ] </font></i></a>
        </div>
    </script>
    <script type="text/html" id="ui_additem_content">
        {{each items as itemData i}}
        <li><label class="input-check"><input type="{{if type==1}}radio{{else if type==2}}checkbox{{/if}}" name="{{name}}" value="{{itemData.value}}"></label>
            <div class="cq-answer-content T_edit T_plugins" data-Tid="{{itemData.tid}}">选项{{i+1+index}}</div>
        </li>
        {{/each}}
    </script>
    <script type="text/html" id="analysis_tmp">
        <textarea class="exam-textarea analysis_contx" placeholder="请在此填写答案解析"></textarea>
    </script>
    <script type="text/javascript">
        $(function() {

            exam.init();
            $("select").dcselect();
            //问卷重现
            var result = eval(${Questionnaire});
                if(result!=null) {
                    console.info(result);
                    reView(result);
                }

        });
    </script>
</div>
<!--主体框架结束-->
</body>
</html>
